<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SetMaterialColor</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">SetMaterialColor()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>SetMaterialColor</b></font>(#Material, Type, Color)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Set the specified material color. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Material</i></td>
<td width="90%"> 
 
The material to use. 

 

</td></tr>
<tr><td><i>Type</i></td>
<td> 
 
The color type to set. It can be one of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Material_AmbientColor</font>:  the color used by default, without other lighting.
  <font color="#924B72">#PB_Material_DiffuseColor</font>:  the color the material will reflect when it will be dynamically lighted. 
                               For example, using a full white color will result at normal lighting (all colors 
                               are reflected). If you use a red, then only the red colors of the material will be 
                               reflected, resulting as a full red material (or black one, if the material doesn't
                               contain any red color).
  <font color="#924B72">#PB_Material_SpecularColor</font>: the color the material will reflect when it will be dynamically lighted by a light 
                               which has a specular color value. For example, using a full white color will result at 
                               normal lighting (all colors are reflected). If you use a red, then only the red colors 
                               of the material will be reflected, resulting as a full red material (or black one, if 
                               the material doesn't contain any red color).                
  <font color="#924B72">#PB_Material_SelfIlluminationColor</font>: the color the material will emit even if no light reach it.
</font></pre>

</td></tr>
<tr><td><i>Color</i></td>
<td> 
 
The RGB color value to set. A valid RGB value can be created with <a href="../2ddrawing/rgb.html">RGB()</a>. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

None.





</blockquote><p><b>See Also</b></p><blockquote>

<a href="getmaterialcolor.html">GetMaterialColor()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=setmaterialattribute.html>SetMaterialAttribute()</a> - <a href=index.html>Material Index</a>


</body></html>